package com.gupao.javavip.quartz.service;

import com.gupao.javavip.quartz.dto.MessageDTO;
import lombok.extern.apachecommons.CommonsLog;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author King
 * @Classname MessageService
 * @Description
 * @Date 2020/5/6 11:34
 */
@CommonsLog
@Service
public class MessageService {
    public List<MessageDTO> queryMessage() {
        List<MessageDTO> messageDTOList = new ArrayList<>();

        int messageCount = 20000;
        for (int i = 0; i < messageCount; i++) {
            MessageDTO messageDTO = new MessageDTO();
            messageDTO.setTitle("message_" + i);
            messageDTO.setContent("this is message " + i);
            messageDTO.setCreateTime(System.currentTimeMillis() + "");
            messageDTOList.add(messageDTO);
        }

        return messageDTOList;
    }
}
